const mongoose = require('mongoose')

mongoose.connect(`mongodb://localhost:27017/gradtionDesign`,{
    useNewUrlParser: true,
    useUnifiedTopology: true,
    // authSource: 'admin'
})
mongoose.connection.on('error', err => {
    console.log('连接失败')
})
console.log('数据库连接成功')
module.exports = mongoose